// 设置变量
@bg-color: #b7d4a8;
// 清除默认样式
* {
 margin: 0;
 padding: 0;
//  改变盒子模型的计算方式
 box-sizing: border-box;
}

body {
  font: bold 20px Courier;
}

h2 {
  padding-top: 20px;
  text-align: center;
}

// 设置主窗口的样式
#main {
  margin: 20px auto;
  width: 360px;
  height: 420px;
  background-color: @bg-color;
  border: 10px solid black;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;

  #stage {
    position: relative;
    width: 304px;
    height: 304px;
    border: 2px solid black;
    #snake {
      &>div {
        position: absolute;
        width: 10px;
        height: 10px;
        background-color: black;
        border: 1px solid @bg-color;
      }
    }
    #food {
      position: absolute;
      width: 10px;
      height: 10px;
      // background-color: black;
      // border: 1px solid @bg-color;

      left: 40px;
      top: 100px;

      display: flex;
      flex-flow: row wrap;
      justify-content: space-between;
      align-content: space-between;
      &>div {
        width: 4px;
        height: 4px;
        background-color: black;
        transform: rotate(45deg);
      }
    }
  }
  #score-penel {
    width: 280px;
    display: flex;
    justify-content: space-between;
  }
}



